<!DOCTYPE html>
<html>
<head>
    <title>Function Example 9</title>
    <script type="text/javascript">
        function doAdd(num1, num2) {
            //if(arguments.length == 1) {
                arguments[1] = 10;
            //}
            alert(arguments[0] + num2);
        }

        doAdd(10, 20);        //20
        doAdd(30, 20);    //50

    </script>
</head>
<body>

</body>
</html>